home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1991 / Feb 91 / MacApp.Tech$ 2⁄22⁄91 / 3036-DoSetCursor Question-Feb91 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  38 lines  |  [TEXT/GEOL]

  1. Item    0770805                         20-Feb-91        18:59PST
  2.  
  3. From:   CDA0542                         Serge Froment, Informagique,IDV
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. ------------------------------------------------------------------------------
  8.  
  9. Sub:    DoSetCursor Question
  10.  
  11. Dear MacApp Gurus,
  12.  
  13. I have an application that can draw shapes inside a view. When these shapes are
  14. selected, they have the usual black handles at each corner. I want the cursor
  15. changes to a small crosshair when it is over an handle.
  16.  
  17. How should I handle the cursorRgn parameter to DoSetCursor? If I set it to the
  18. value returned by GetDefaultCursorRgn minus the position of all possible shape
  19. handles, then newly created or moved shapes are not seen until the cursor
  20. leaves the view and comes back.
  21.  
  22. Should I empty gCursorRgn when I create or move shape to force MacApp to call
  23. DoSetCursor? I suspect it may be a bad idea to fiddle with MacApp globals, but
  24. I see no other way to force a call to DoSetCursor.
  25.  
  26. Of course, I may don't care and leave cursorRgn empty. It works, but I wonder
  27. at what price...
  28.  
  29. BTW, I looked at the MacApp sample DrawShapes program. It does set cursorRgn
  30. only when the cursor had been changed to a thick cross, when over a shape.
  31. Looking at this code, I suspected the cursor not to be updated properly when
  32. you drag a shape slightly, without leaving the original area. That's what
  33. happens, but only if you leave the original shape area from the top. I am
  34. perplexed.
  35.  
  36. Serge
  37.  
  38.